define(['handlebars','text!js/risk/module.hbs'],function(Handlebars,riskSource) {
	var $$ = Dom7;

	function render(params) {
		
		var template = Handlebars.compile(riskSource);
		var _content = template(params.model);
		
		var _el = $('.risk-page .rb-grid')
		_el.html(_content);

		bindEvents(params.bindings);
		
	}

	function bindEvents(bindings) {
		for (var i in bindings) {
			$$(bindings[i].element).on(bindings[i].event, bindings[i].handler);
		}
	}

	return {
		render: render
	}
});